<script>
	import appUserData from 'Data/UserData.json'
	import '@/static/font_4005658_1b5ag95uqfq/iconfont.css'
	import '@/static/font_4005658_1b5ag95uqfq/iconfont.ttf'
	export default {
		onLaunch: function() {
			  
				// 获取用户静态数据，加载在全局变量 globalUserCollection 之上
				getApp().globalData.globalUserCollection = appUserData
				// appAxios.get('/data/user.json').then(res=>{
				// 	getApp().globalData.globalUserCollection = res.data
				// }).catch(err=>{
				// 	console.log(err)
				// })
				// // 检查本地存储是否已经有用户 token
				uni.getStorage({
					key:"token",
					success:function(res){
						let tokenString = res.data;
						if (tokenString != '') {
							// 为当前用户赋值
							getApp().globalData.globalUser = JSON.parse(tokenString);
							// 跳转至学习中心
							uni.reLaunch({
								url: 'pages/tabBar/home/home'
							})
						}
					}
				})
         
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},// 全局变量
		globalData: {
			// 当前用户
			globalUser: {
				name: '未登录',
				userName: '',
				phoneNumber: '',
				email: '',
				password: '',
				confirmPassword: ''
			},
			// 演示用的内存中的用户集合
			globalUserCollection: null
		},
	}
</script>

<style lang="scss">
@font-face {
  font-family: "iconfont"; /* Project id 4005658 */
  src: url('/static/font_4005658_1b5ag95uqfq/iconfont.woff2?t=1682094120208') format('woff2'),
       url('/static/font_4005658_1b5ag95uqfq/iconfont.woff?t=1682094120208') format('woff'),
       url('/static/font_4005658_1b5ag95uqfq/iconfont.ttf?t=1682094120208') format('truetype');
}

.iconfont {
  font-family: "iconfont" !important;
  font-size: 16px;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-xiangqing-:before {
  content: "\e648";
}

.icon-paihang:before {
  content: "\e670";
}

.icon-shanchu:before {
  content: "\e606";
}

.icon-31shezhi:before {
  content: "\e607";
}

.icon-bangzhuyufankui:before {
  content: "\e60d";
}

.icon-jiahao:before {
  content: "\e726";
}

.icon-denglu:before {
  content: "\e66b";
}

.icon-mulu:before {
  content: "\e651";
}

.icon-yejianmoshi:before {
  content: "\e611";
}

.icon-dianzan:before {
  content: "\ec7f";
}

.icon-weidenglu:before {
  content: "\e6a3";
}

.icon-guanyuwomen:before {
  content: "\e691";
}

.icon-xiangqing:before {
  content: "\e620";
}

.icon-icon-:before {
  content: "\e65e";
}

.icon-pinglun:before {
  content: "\e618";
}

.icon-pinglun1:before {
  content: "\e60a";
}

.icon-renwujindu:before {
  content: "\e6c2";
}

.icon-a-tianjiaguanzhuguanzhu:before {
  content: "\e6aa";
}

.icon-yiguanzhu:before {
  content: "\e604";
}

.icon-shoucang:before {
  content: "\e605";
}

.icon-airudiantubiaohuizhi-zhuanqu_aidushu:before {
  content: "\e692";
}

.icon-shouye:before {
  content: "\e600";
}

.icon-fanhui5:before {
  content: "\e601";
}

.icon-fenleiorguangchangorqita:before {
  content: "\e64f";
}

.icon-shouye1:before {
  content: "\e615";
}

.icon-return:before {
  content: "\e6ba";
}

.icon-tuijian:before {
  content: "\e67d";
}

.icon-jiarushujia:before {
  content: "\e60f";
}

.icon-sousuo:before {
  content: "\e8b9";
}

.icon-wodeshujia:before {
  content: "\e63e";
}

.icon-a-Frame20:before {
  content: "\e608";
}



</style>

